package com.guo.hui.eurekaconsumer;

import org.jboss.logging.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;


/**
 * @ClassName FeignController
 * @Description TODO
 * @Author zhengguohui
 * @Date 2018/7/18 11:04
 */
@RestController
public class FeignController {

    private final Logger logger = Logger.getLogger(getClass());

    @Autowired
    EurekaDemoClient eurekaDemoClient;

    @GetMapping("/feign")
    public String feign(String name) {
        logger.info("==feign1==");
        String ss = eurekaDemoClient.hello(name);
        String ss1 = eurekaDemoClient.world(name, 22);
        String ss2 = eurekaDemoClient.dc();
        logger.info("==feign2==");
        return ss + ss1 + ss2;
    }
}
